package oop2;

/**
 * @author oldliu
 * @since 1.0
 */
public class Bus {
    String no;
    String from,to;
    public Bus(String n){
        this.no=n;
    }

    public Bus(String from, String to) {
        this.from = from;
        this.to = to;
    }

    public Bus(String no, String from, String to) {
        this.no = no;
        this.from = from;
        this.to = to;
    }
    public void intro(){
        System.out.println("这是"+no+"路公交车，从"+from+"到"+to+",欢迎您乘车");
    }
}
